-
Notifications
You must be signed in to change notification settings - Fork 46
Fix for app link redirect from CCT due to forced browser preference, Fixes AB#3387976 #2775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where app link redirects from Chrome Custom Tabs (CCT) were failing due to forced browser package preferences. The fix removes explicit package setting for browser intents to allow the system to properly handle app link redirects.
- Removes forced browser package assignment in CustomTabsManager
- Removes explicit package setting in SwitchBrowserActivity browser intent
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| CustomTabsManager.java | Removes setPackage call that forced CCT to use specific browser package |
| SwitchBrowserActivity.kt | Removes explicit package setting on browser intent to allow system routing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
...c/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt
Show resolved
Hide resolved
…AB#3391792 (#2777) Fixes [AB#3391792](https://dev.azure.com/IdentityDivision/Engineering/_workitems/edit/3391792) Related: #2775
…Intent, Fixes AB#3391792 (#2778) Fixes [AB#3391792](https://dev.azure.com/IdentityDivision/Engineering/_workitems/edit/3391792) Related: #2775
Fixes AB#3387976
The previous fix seems to have addressed the issue only partially.
Previous fix: #2745
Basically what's happening is that even with that flag CCT will sometimes still launch the URL in browser and this is happening because we're setting the browser's pkg name explicitly on the intent which tells the OS that this MUST be opened in the browser.
Checked CCT logs and they print something like:
Launching in browser as Browser pkg was explicitly set on the IntentOnce we remove the explicit pkg name then OS finds the best possible app on the device to handle the intent. For an app link that's the the broker hosting app.